<%= render layout: "layouts/decidim/shared/layout_center" do %>

  <%= render partial: "wizard_header" %>

  <%= decidim_form_for(@form, url: update_draft_amend_path(amendment), method: :patch) do |form| %>
    <div class="form__wrapper">
      <%= render partial: "edit_form_fields", locals: { form:, original: :emendation } %>
    </div>

    <div class="form__wrapper-block flex-col-reverse md:flex-row justify-between">
      <%= link_to wizard_aside_back_url(amendable), class: "button button__sm md:button__lg button__text-secondary" do %>
        <%= icon "arrow-left-line" %>
        <%= t("back", scope: "decidim.wizard_step_form.wizard_aside") %>
      <% end %>
      <%= link_to destroy_draft_amend_path(amendment), method: :delete, class: "button button__sm md:button__lg button__transparent-secondary" do %>
        <span><%= t("discard", scope: "decidim.amendments.edit_draft") %></span>
      <% end %>
      <button type="submit" class="button button__sm md:button__lg button__secondary">
        <span><%= t("send", scope: "decidim.amendments.edit_draft") %></span>
        <%= icon "arrow-right-line" %>
      </button>
    </div>
  <% end %>

<% end %>
